home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
misc
/
mcadangl.zip
/
RADTODMS.MCD
next >
Wrap
Text File
|
1994-11-29
|
11KB
|
338 lines
.MCAD 303010000 1 0 56 0
.CMD FORMAT rd=d ct=10 im=i et=3 zt=15 pr=3 mass length time charge temperature tr=0 vm=-2063149856
.CMD SET ORIGIN 0
.CMD SET TOL 0.001000000000000
.CMD SET PRNCOLWIDTH 8
.CMD SET PRNPRECISION 4
.CMD PRINT_SETUP 1.200000 0.000000 0.000000 0.000000 0
.CMD HEADER_FOOTER 1 1 *empty* *empty* *empty* 0 1 *empty* *empty* *empty*
.CMD HEADER_FOOTER_FONT fontID=14 family=Arial points=10 bold=0 italic=0 underline=0
.CMD HEADER_FOOTER_FONT fontID=15 family=Arial points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE_NAME fontID=0 name=Variables
.CMD DEFINE_FONTSTYLE_NAME fontID=1 name=Constants
.CMD DEFINE_FONTSTYLE_NAME fontID=2 name=Text
.CMD DEFINE_FONTSTYLE_NAME fontID=4 name=User^1
.CMD DEFINE_FONTSTYLE_NAME fontID=5 name=User^2
.CMD DEFINE_FONTSTYLE_NAME fontID=6 name=User^3
.CMD DEFINE_FONTSTYLE_NAME fontID=7 name=User^4
.CMD DEFINE_FONTSTYLE_NAME fontID=8 name=User^5
.CMD DEFINE_FONTSTYLE_NAME fontID=9 name=User^6
.CMD DEFINE_FONTSTYLE_NAME fontID=10 name=User^7
.CMD DEFINE_FONTSTYLE fontID=0 family=Times^New^Roman points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=1 family=Times^New^Roman points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=2 family=Arial points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=4 family=Arial points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=5 family=Courier^New points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=6 family=System points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=7 family=Script points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=8 family=Roman points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=9 family=Modern points=10 bold=0 italic=0 underline=0
.CMD DEFINE_FONTSTYLE fontID=10 family=Times^New^Roman points=10 bold=0 italic=0 underline=0
.CMD UNITS U=1
.CMD DIMENSIONS_ANALYSIS 0 0
.TXT 3 3 1 0
Cg a48.250000,71.000000,50
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\fs28 \ul \b SEXAGESIMAL ANGLE/TIME
CONVERSIONS}}
}
.TXT 3 0 2 0
Cg a71.375000,71.000000,1085
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {Since Mathcad functions expect
all angular arguments in radians it is easiest
to supply all\par angular arguments in
radians and create a few functions for converting
between "radians" and\par "sexagesimal"
units (degrees, minutes, seconds(DMS)).
Below is my attempt at these conversions.
}{\b rtdms}{ is the inverse function of
}{\b dmstr}{. There is no inverse function
for }{\b rtdmsv}{, it is mainly for creating
more readable output. }{Because these functions
use global definitions they \par can be
pasted anywhere in your Mathcad document
(e.g. at the end) and still be accessible
to \par all equations in your document.
Care must be used when adding angular values.
If angles have been converted to DMS format
they must be converted back to radians
before they can be added. It would be very
easy to create a function to add angles
in the DMS format but all that I want \par
these functions to do is convert my DMS
data to radians so that Mathcad can work
with it and then convert the results that
I get from Mathcad back to DMS. These functions
will handle negative input values. \par
}}
}
.TXT 28 -2 3 0
Cg a48.250000,73.000000,129
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul \b rt}{\ul \b dms(radians)}{
- }{\ul \b R}{ADIANS }{\ul \b T}{O }{\ul
\b D}{EGREES, }{\ul \b M}{INUTES, }{\ul
\b S}{ECONDS}}
}
.TXT 3 0 4 0
Cg a68.125000,73.000000,152
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul \b rtdmsv(radians)}{ - }{\b
\ul R}{ADIANS }{\ul \b T}{O }{\ul \b D}{EGREES,
}{\ul \b M}{INUTES, }{\ul \b S}{ECONDS
WITH }{\ul \b V}{ECTOR OUTPUT }}
}
.TXT 4 0 5 0
Cg a72.625000,73.000000,766
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul \b rtdms}{\ulnone \b0 - The
output of this function is a scalar, e.g.,
0.5 rad will convert to "28.385240". (28
deg 38\par min 52.40 sec). The minutes
and seconds value may be rounded if the
"Displayed Precision" is set\par to a value
less than 4 (see NUMERICAL FORMAT,}{\b0
\ulnone ALT+M, F}{\b0 \ulnone ).\par \par
}{\ul \b rtdmsv}{\b0 \ulnone - The output
of this function is a vector (actually
it is a 1 X 3 matrix), e.g., 0.5 rad will
convert to "( 28 38 52.40)". }{\b0 \ulnone
The value of "nod" (see below) determines
the }{\ul \b0 n}{\b0 \ulnone umber }{\ul
\b0 o}{\b0 \ulnone f }{\ul \b0 d}{\b0 \ulnone
ecimals in the seconds value. Unwanted trailing
zeroes in the decimals of seconds value
can be removed using the NUMERICAL FORMAT
settings }{\b0 \ulnone ( ALT+M, F)}{\b0
\ulnone . }}
}
.TXT 20 0 6 0
Cg a19.750000,73.000000,60
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul \b r}{adians }{\ul \b t}{o
decimal }{\ul \b d}{egrees}}
}
.TXT 0 23 7 0
Cg a19.750000,43.000000,73
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ulnone \b0 d}{ecimal }{\ul \b
d}{egrees }{\ul \b t}{o }{\ul \b r}{adians}}
}
.EQN 4 -23 8 0
{0:rtd}NAME~(180)/({0:\p}NAME)
.EQN 0 23 9 0
{0:dtr}NAME~({0:\p}NAME)/(180)
.EQN 0 25 42 0
{0:chop}NAME({0:r}NAME)~{0:if}NAME({0:r}NAME<0,{0:ceil}NAME({0:r}NAME),{0:floor}NAME({0:r}NAME))
.TXT 2 0 44 0
Cg a25.000000,36.625000,69
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\fs16 The chop function handles
the truncation\par of negative angles.}}
}
.EQN 3 -48 45 0
{0:r_d}NAME({0:r}NAME)~{0:chop}NAME({0:r}NAME*{0:rtd}NAME)
.EQN 3 0 46 0
{0:r_m}NAME({0:r}NAME)~{0:chop}NAME(({0:r}NAME*{0:rtd}NAME-{0:r_d}NAME({0:r}NAME))*60)
.EQN 2 36 48 0
{0:nod}NAME~3
.TXT 0 7 14 0
Cg a37.000000,37.000000,264
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {<< }{\fs16 \ul \b n}{\fs16 umber
}{\fs16 \ul \b o}{\fs16 f }{\fs16 \ul \b
d}{\fs16 ecimals - increase this value
to get more decimals in the
seconds value or set it to zero for no
decimal places (for }{\fs16
\b rtdmsv}{\fs16 only).}}
}
.EQN 1 -43 47 0
{0:r_s}NAME({0:r}NAME)~(({0:r}NAME*{0:rtd}NAME-{0:r_d}NAME({0:r}NAME))*60-{0:r_m}NAME({0:r}NAME))*60
.EQN 5 0 49 0
{0:r_sd}NAME({0:r}NAME)~{0:r_s}NAME({0:r}NAME)-(({0:r_s}NAME({0:r}NAME)*(10)^({0:nod}NAME)-{0:chop}NAME({0:r_s}NAME({0:r}NAME)*(10)^({0:nod}NAME)))/((10)^({0:nod}NAME)))
.EQN 6 0 50 0
{0:rtdms}NAME({0:r}NAME)~{0:r_d}NAME({0:r}NAME)+({0:r_m}NAME({0:r}NAME))/(100)+({0:r_s}NAME({0:r}NAME))/(10000)
.EQN 0 26 51 0
{0:rtdmsv}NAME({0:r}NAME)~({1,3}÷{0:if}NAME({0:r_sd}NAME({0:r}NAME)<0,-{0:r_sd}NAME({0:r}NAME),{0:r_sd}NAME({0:r}NAME))÷{0:if}NAME({0:r_m}NAME({0:r}NAME)<0,-{0:r_m}NAME({0:r}NAME),{0:r_m}NAME({0:r}NAME))÷{0:r_d}NAME({0:r}NAME))
.TXT 5 -26 18 0
Cg a21.875000,73.000000,38
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}}
}
.TXT 0 26 19 0
Cg a42.500000,43.000000,71
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}}
}
.TXT 3 -25 20 0
Cg a52.750000,72.000000,121
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul \b EXAMPLE}{\ul \b :
}{\b }}
}
.EQN 3 1 21 0
{0:\b}NAME:{0}0.5
.TXT 0 6 22 0
Cg a5.250000,65.000000,10
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {radians}}
}
.EQN 3 -6 23 0
{0:rtdms}NAME({0:\b}NAME)={84534}?_n_u_l_l_
.TXT 0 20 24 0
Cg a2.375000,51.000000,8
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\b OR}}
}
.EQN 0 8 25 0
{0:rtdmsv}NAME({0:\b}NAME)={0}?_n_u_l_l_
.TXT 4 -28 26 0
Cg a53.000000,71.000000,244
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {The main difference between }{\b
rtdms}{ and }{\b rtdmsv}{ is that the vector
output\par of }{\b rtdmsv}{ is a little
easier to read.\par }{\ul
}}
}
.TXT 7 -2 56 0
C x1,1,0,0
.TXT 5 0 28 0
Cg a54.000000,72.000000,125
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul \b dmstr(DDD.MMSSsss)}{ - }{\ul
\b D}{EGREES, }{\ul \b M}{INUTES, }{\ul
\b S}{ECONDS, }{\ul \b T}{O }{\ul \b R}{ADIANS}}
}
.TXT 3 3 29 0
Cg a67.500000,69.000000,456
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {The following functions will convert
an angle in degrees, minutes, seconds format
to radians.\par The format for the input
angle is DDD.MMSSsss, e.g., }{\ul 118}{\ulnone
\up6 deg}{\ul 42}{\ulnone \up6 min}{\ul
09.2211}{\ulnone \up6 sec}{ would be \par
input as }{\ul 118.42092211}{. The value
for seconds can include any number of decimal
places.\par The number of decimal places
in the radian output value is controlled
by the NUMERICAL \par FORMAT settings (
ALT+M, F). }}
}
.EQN 14 -1 52 0
{0:d_d}NAME({0:d}NAME)~{0:chop}NAME({0:d}NAME)
.EQN 3 0 53 0
{0:d_m}NAME({0:d}NAME)~{0:chop}NAME(({0:d}NAME-{0:d_d}NAME({0:d}NAME))*100)
.EQN 3 0 54 0
{0:d_s}NAME({0:d}NAME)~((({0:d}NAME-{0:d_d}NAME({0:d}NAME))*100)-{0:d_m}NAME({0:d}NAME))*100
.EQN 4 0 55 0
{0:dmstr}NAME({0:d}NAME)~({0:d_d}NAME({0:d}NAME)*3600+{0:d_m}NAME({0:d}NAME)*60+{0:d_s}NAME({0:d}NAME))/(206264.806247)
.TXT 4 0 34 0
Cg a29.375000,72.000000,50
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}}
}
.TXT 6 0 35 0
Cg a52.750000,72.000000,121
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul \b EXAMPLE}{\ul \b :
}{\b }}
}
.EQN 4 0 36 0
{0:\a}NAME:{0}28.3852403123
.TXT 0 16 37 0
Cg a22.375000,56.000000,59
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {(28 }{\up6 deg}{ 38 }{\up6 min}{
52.403123 }{\up6 sec}{)}}
}
.EQN 4 -16 38 0
{0:dmstr}NAME({0:\a}NAME)={18995}?_n_u_l_l_
.TXT 3 0 39 0
Cg a52.500000,72.000000,112
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {\ul
}}
}
.TXT 4 0 40 0
Cg a8.625000,72.000000,15
{\rtf1\ansi \deff0
{\fonttbl
{\f0\fnil Arial;}
}
{\plain {End Of File.}}
}